-- GENERATED SPELL FOR [Sargeron Archer] --


function spell0_20901(pUnit, Event) --@Frost Arrow,n/a--
pUnit:FullCastSpellOnTarget(35964,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20901', 589, 1)
end

function spell1_20901(pUnit, Event) --@Frost Arrow,n/a--
pUnit:FullCastSpellOnTarget(38942,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20901', 6323, 1)
end

function spell2_20901(pUnit, Event) --@Hooked Net,n/a--
pUnit:FullCastSpellOnTarget(36827,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20901', 6500, 1)
end

function spell3_20901(pUnit, Event) --@Hooked Net,n/a--
pUnit:FullCastSpellOnTarget(38912,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20901', 6500, 1)
end

function spell4_20901(pUnit, Event) --@Immolation Arrow,n/a--
pUnit:FullCastSpellOnTarget(35932,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20901', 3000, 1)
end

function spell5_20901(pUnit, Event) --@Immolation Arrow,n/a--
pUnit:FullCastSpellOnTarget(38943,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20901', 2000, 1)
end

function spell6_20901(pUnit, Event) --@Rapid Fire,Self--
pUnit:FullCastSpellOnTarget(36828,pUnit)
pUnit:RegisterEvent('Sorts_20901', 10335, 1)
end

function spell7_20901(pUnit, Event) --@Serpent Sting,n/a--
pUnit:FullCastSpellOnTarget(36984,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20901', 15000, 1)
end

function spell8_20901(pUnit, Event) --@Serpent Sting,n/a--
pUnit:FullCastSpellOnTarget(38914,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20901', 15000, 1)
end

function spell9_20901(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20901', 599, 1)
end

function spell10_20901(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(38940,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20901', 527, 1)
end

function Sorts_20901(pUnit, Event)
local choix_sorts_20901 = math.random(0, 10)
if choix_sorts_20901 == 0 then
pUnit:RegisterEvent('spell0_20901', 1, 1)
end
if choix_sorts_20901 == 1 then
pUnit:RegisterEvent('spell1_20901', 1, 1)
end
if choix_sorts_20901 == 2 then
pUnit:RegisterEvent('spell2_20901', 1, 1)
end
if choix_sorts_20901 == 3 then
pUnit:RegisterEvent('spell3_20901', 1, 1)
end
if choix_sorts_20901 == 4 then
pUnit:RegisterEvent('spell4_20901', 1, 1)
end
if choix_sorts_20901 == 5 then
pUnit:RegisterEvent('spell5_20901', 1, 1)
end
if choix_sorts_20901 == 6 then
pUnit:RegisterEvent('spell6_20901', 1, 1)
end
if choix_sorts_20901 == 7 then
pUnit:RegisterEvent('spell7_20901', 1, 1)
end
if choix_sorts_20901 == 8 then
pUnit:RegisterEvent('spell8_20901', 1, 1)
end
if choix_sorts_20901 == 9 then
pUnit:RegisterEvent('spell9_20901', 1, 1)
end
if choix_sorts_20901 == 10 then
pUnit:RegisterEvent('spell10_20901', 1, 1)
end
end

function mob20901_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20901', math.random(1500, 3000), 1)
end

function mob20901_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20901_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20901_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20901, 1, 'mob20901_Action')
RegisterUnitEvent(20901, 2, 'mob20901_Leave')
RegisterUnitEvent(20901, 3, 'mob20901_Kill')
RegisterUnitEvent(20901, 4, 'mob20901_Die')
